package chp03.homework;

import java.util.Scanner;

public class Home1 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("请输入会员积分:");
        int score = input.nextInt();

        //折扣(默认原价，不打折)
        double discount = 1;
        if(score >= 8000){
            System.out.println("六折");
            discount = 0.6;
        }else if(score >= 4000){
            System.out.println("七折");
            discount = 0.7;
        }else if(score >= 2000){
            System.out.println("八折");
            discount = 0.8;
        }else{
            System.out.println("九折");
            discount = 0.9;
        }
        System.out.println("折扣:"+discount);

        System.out.print("请输入商品总结:");
        double money = input.nextDouble();
        System.out.println("原价:" + money);
        money = money * discount;
        System.out.println("打折后:" + money);

    }
}
